package com.xiaoyu.lanling.feature.invite.model

import `in`.srain.cube.request.JsonData
import `in`.srain.cube.views.list.ListPositionedItemBase
import com.xiaoyu.base.model.User
import com.xiaoyu.base.utils.extensions.dp
import com.xiaoyu.lanling.media.image.UserImageLoadParam

class InviteEarnItem(position: Int, jsonData: JsonData) : ListPositionedItemBase(position) {
    val user = User.fromJson(jsonData.optJson("user"))
    val time = jsonData.optString("earnTime")
    val money = jsonData.optString("money")
    val earnDesc = jsonData.optString("tag");
    val loadParam = UserImageLoadParam.newBuilder().setUserAndDP(user, 32).setCornersRadius(16.dp)?.build()

    override fun getViewType(): Int {
        return 0
    }
}